Fix access to QByteArray/QString outside the valid range. (#537)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Tue, 14 Apr 2020 21:33:19 +0000 (15:33 -0600)
committerGitHub <noreply@github.com>
Tue, 14 Apr 2020 21:33:19 +0000 (15:33 -0600)
commita40fee45a3ec4fe1741f70f0af80039ee64fea05
tree25667f0baac1a769fd48c00d63e81b3e07827325
parent7572e8721c28235657038fad87e4c484ef5cc04b
Fix access to QByteArray/QString outside the valid range. (#537)

With Qt 5.15, and likely 5.14, the following warnings were generated during
testo:
Using QByteRef with an index pointing outside the valid range of a QByteArray. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
Note this requires Qt to be compiled for debug.

These warnings can be debugged by running testo with
"export QT_FATAL_WARNINGS=1" to generate core dumps.

I suspect the appending of null terminators in ggv_bin is unecessary,
i.e. I beleive QByteArray::resize() in ggv_bin_read_bytes will take
care of this.  Never the less I slavishly kept adding them just to make
certain.
ggv_bin.cc
xcsv.cc